#ifndef SYSTEMTRAY_H
#define SYSTEMTRAY_H

#include <QSystemTrayIcon>
#include <QMenu>

class SystemTray : public QObject {
    Q_OBJECT
public:
    explicit SystemTray(QObject *parent = nullptr);
    void showMessage(const QString &title, const QString &message);
    void showMessage(const QString &title, const QString &message, const int& msecs);

    bool isVisible();

signals:
    void systemTrayIconActivated(QSystemTrayIcon::ActivationReason);

private:
    QSystemTrayIcon *trayIcon;
    QMenu *contextMenu;
    QAction *quitAction;
    QAction *restoreAction;
    const QIcon icon;
};

#endif // SYSTEMTRAY_H
